﻿Imports System

Namespace System.Workflow.Activities.Rules
    Friend Class RuleArrayElementResult
        Inherits RuleExpressionResult
        ' Methods
        Public Sub New(ByVal targetArray As Array, ByVal indexerArguments As Long())
            If (targetArray Is Nothing) Then
                Throw New ArgumentNullException("targetArray")
            End If
            If (indexerArguments Is Nothing) Then
                Throw New ArgumentNullException("indexerArguments")
            End If
            Me.targetArray = targetArray
            Me.indexerArguments = indexerArguments
        End Sub


        ' Properties
        Public Overrides Property Value As Object
            Get
                Return Me.targetArray.GetValue(Me.indexerArguments)
            End Get
            Set(ByVal value As Object)
                Me.targetArray.SetValue(value, Me.indexerArguments)
            End Set
        End Property


        ' Fields
        Private indexerArguments As Long()
        Private targetArray As Array
    End Class
End Namespace

